﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Model
{
    public class SimpleRoomInfo
    {
        static string[] hz = new string[] { "一", "二", "三", "四", "五", "六", "七", "八", "九", "十" };
        int? _roomid;
        public int? RoomID { get { return _roomid; } set { _roomid = value; } }
        public string ClassName { get; set; }
        string _roomname;
        public string RoomName { get { return string.IsNullOrWhiteSpace(_roomname) ? "未分配教室" : _roomname; } set { _roomname = value; } }
        private string _displayname = string.Empty;
        public string DisplayName
        {
            get
            {
                return string.IsNullOrEmpty(_displayname) ? ClassName + "[" + RoomName + "]" : _displayname;
            }
            set
            {
                _displayname = value;
            }
        }
        public string GradeName { get; set; }
        public string GreadeID { get; set; }
        public string GradeInfoId { get; set; }
        public string OrderName
        {
            get
            {
                string _name = ClassName;
                if(!string.IsNullOrWhiteSpace(_name))
                    for (int i = 0; i < hz.Length; i++)
                    {
                        _name = _name.Replace(hz[0], (0 + 1).ToString());
                    }
                return _name;
            }
        }
    }
}
